/**主题基础样式***/
// 主题
// $base-color-blue: #1890ff;
// $base-color-green: #00B42A;
// $base-color-yellow: #FFAB00;
// $base-color-red: #ed4014;
// $base-color-grey: #909399;

$base-color-blue: #0052CC;
$base-color-green: #00B42A;
$base-color-yellow: #EAA10C;
$base-color-red: #F04141;
$base-color-grey: #909399;
$base-color-black: #202D40;


// 文字
$base-color-text-primary: #303133;
$base-color-text-regular: #515a6e;
$base-color-text-secondary: #909399;
$base-color-text-placeholder: #c0c4cc;
// 边框
$base-border-color-base: #dcdfe6;
$base-border-color-light: #e4e7ed;
$base-border-color-lighter: #ebeef5;
$base-border-color-extra-light: #f2f6fc;
//布局
$base-border-radius: 2.5px;
$base-menu-item-height: 50px;
$base-color-white: #fff;

// 1:菜单栏背景色
$base-aside-bg-color: #fff;
// 2:菜单字体颜色控制
$base-menu-text-color: #202D40;
$base-menu-text-color-active: $base-color-blue;
// 3:菜单悬浮激活背景色
$base-menu-bg-color-active: #e9f2ff;
// 4: logo字体颜色
$base-logo-txt-color: #202D40;

@forward 'element-plus/theme-chalk/src/common/var.scss' with (
	$colors: (
		'primary': (
			'base': $base-color-blue,
		),
		'success': (
			'base': $base-color-green,
		),
		'warning': (
			'base': $base-color-yellow,
		),
		'danger': (
			'base': $base-color-red,
		),
		'error': (
			'base': $base-color-red,
		),
		'info': (
			'base': $base-color-grey,
		),
	),
	$text-color: (
		'primary': $base-color-text-primary,
		'regular': $base-color-text-regular,
		'secondary': $base-color-text-secondary,
		'placeholder': $base-color-text-placeholder,
	),
	$border-color: (
		'': $base-border-color-base,
		'light': $base-border-color-light,
		'lighter': $base-border-color-lighter,
		'extra-light': $base-border-color-extra-light,
	),
	$border-radius: (
		'base': $base-border-radius,
		'small': $base-border-radius,
	),
	$menu: (
		'item-height': $base-menu-item-height,
	)
);

@use 'element-plus/theme-chalk/src/index.scss' as *;

/* ---------------- 初始化样式Begin ------------ */

:root {
	--base-top-bar-border-color: #f1f2f3;
	// 顶部TOPBAR字体颜色
	--base-top-bar-txt-color: #515a6e;
	// 顶部TOPBAR背景颜色
	--base-top-bar-bg-color: #fff;
	// 可视区背景颜色
	--base-layout-bg-color: #f5f7f9;
	// 右侧顶部用户信息悬浮颜色
	--base-layout-top-hover: $base-aside-bg-color;
	// 菜单栏背景色
	--base-layout-aside-bg-color:$base-aside-bg-color;
	// 头部高度
	--base-layout-height: 60px;
	--el-color-warning-light-5: #EAA10C;

}
/* ---------------- 初始化样式END ------------ */

@mixin base-scrollbar {
  &::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  &::-webkit-scrollbar-thumb {
    background-color: mix($base-color-white, #282c34, 90%);
    border: 3px solid transparent;
    border-radius: 7px;
  }
  &::-webkit-scrollbar-thumb:hover {
    background-color: mix($base-color-white, #282c34, 90%);
  }
}

// 第三方图标字体间距/大小设置
@mixin generalIcon {
	font-size: 14px !important;
	display: inline-block;
	vertical-align: middle;
	margin-right: 5px;
	width: 20px;
	text-align: center;
	justify-content: center;
}

/* 文本不换行
------------------------------- */
@mixin text-no-wrap() {
	text-overflow: ellipsis;
	overflow: hidden;
	white-space: nowrap;
}

/* 多行文本溢出
  ------------------------------- */
@mixin text-ellipsis($line: 2) {
	overflow: hidden;
	word-break: break-all;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: $line;
	-webkit-box-orient: vertical;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	outline: none !important;
	@include base-scrollbar;
}



html,
body,
#app {
	margin: 0;
	padding: 0;
	width: 100%;
	height: 100%;
	font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	-webkit-tap-highlight-color: transparent;
	font-size: 14px;
	overflow: hidden;
	position: relative;
	[class*='-page'] {
		height: 100%;
		padding: 15px;
	}
	    /*a标签 */
    a {
      text-decoration: none;
    }

    /*图片 */
    img {
      object-fit: cover;

      &[src=''],
      &:not([src]) {
        opacity: 0;
      }
    }
    .dot-badge {
      padding-top: 6px;
      .el-badge__content {
        &.is-dot {
          width: 6px !important;
          height: 6px !important;
        }
      }
    }
}

/* 主布局样式
------------------------------- */
.layout-container {
	width: 100%;
	height: 100%;
	.layout-pd {
		padding: 15px !important;
	}
	.layout-flex {
		display: flex;
		flex-direction: column;
		flex: 1;
	}
	.layout-aside {
		background: $base-aside-bg-color;
		box-shadow: 2px 0 6px rgb(0 21 41 / 1%);
		height: inherit;
		position: relative;
		z-index: 1;
		display: flex;
		flex-direction: column;
		overflow-x: hidden !important;
		border-right: 1px solid var(--base-top-bar-border-color);
		.el-scrollbar__view {
			overflow: hidden;
		}
	}
	.layout-header {
		padding: 0 !important;
		height: auto !important;
	}
	.layout-main {
		padding: 0 !important;
		overflow: hidden;
		width: 100%;
		background-color: var(--base-layout-bg-color);
		display: flex;
		flex-direction: column;
		// 内层 el-scrollbar样式，用于界面高度自适应（main.vue）
		.layout-main-scroll {
			@extend .layout-flex;
			.layout-parent {
				@extend .layout-flex;
				position: relative;
			}
		}
	}
	// 用于界面高度自适应
	.layout-padding {
		@extend .layout-pd;
		position: absolute;
		left: 0;
		top: 0;
		height: 100%;
		overflow: hidden;
		@extend .layout-flex;
		&-auto {
			height: inherit;
			@extend .layout-flex;
		}
		&-view {
			background: var(--el-color-white);
			width: 100%;
			height: 100%;
			border-radius: 4px;
			border: 1px solid var(--el-border-color-light, #ebeef5);
			overflow: hidden;
		}
	}
	// 用于界面高度自适应，主视图区 main 的内边距，用于 iframe
	.layout-padding-unset {
		padding: 0 !important;
		&-view {
			border-radius: 0 !important;
			border: none !important;
		}
	}
	// 用于设置 iframe loading 时的高度（loading 垂直居中显示）
	.layout-iframe {
		.el-loading-parent--relative {
			height: 100%;
		}
	}
	.el-scrollbar {
		width: 100%;
	}
	.layout-el-aside-br-color {
		border-right: 1px solid var(--el-border-color-light, #ebeef5);
	}
	// pc端左侧导航样式
	.layout-aside-pc-220 {
		width: 220px !important;
		transition: width 0.3s ease;
	}
	.layout-aside-pc-64 {
		width: 64px !important;
		transition: width 0.3s ease;
	}
	.layout-aside-pc-1 {
		width: 1px !important;
		transition: width 0.3s ease;
		position: relative;
		left: -1px;
	}
	// 手机端左侧导航样式
	.layout-aside-mobile {
		position: fixed;
		top: 0;
		left: -220px;
		width: 220px;
		z-index: 9999999;
	}
	.layout-aside-mobile-close {
		left: -220px;
		transition: all 0.3s cubic-bezier(0.39, 0.58, 0.57, 1);
	}
	.layout-aside-mobile-open {
		left: 0;
		transition: all 0.3s cubic-bezier(0.22, 0.61, 0.36, 1);
	}
	.layout-aside-mobile-mode {
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		height: 100%;
		background-color: rgba(0, 0, 0, 0.5);
		z-index: 9999998;
		animation: error-img 0.3s;
	}
	.layout-mian-height-50 {
		height: calc(100vh - 50px);
	}
	.layout-columns-warp {
		flex: 1;
		display: flex;
		overflow: hidden;
	}
	.layout-hide {
		display: none;
	}
}

/* element plus 全局样式
------------------------------- */
.layout-breadcrumb-seting {
	.el-divider {
		background-color: rgb(230, 230, 230);
	}
}

/* nprogress 进度条跟随主题颜色
------------------------------- */
#nprogress {
	.bar {
		background: var(--el-color-primary) !important;
		z-index: 9999999 !important;
	}
}

/* flex 弹性布局
------------------------------- */
.flex {
	display: flex;
}
.flex-auto {
	flex: 1;
	overflow: hidden;
}
.flex-center {
	@extend .flex;
	flex-direction: column;
	width: 100%;
	overflow: hidden;
}
.flex-margin {
	margin: auto;
}
.flex-warp {
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	margin: 0 -5px;
	.flex-warp-item {
		padding: 5px;
		.flex-warp-item-box {
			width: 100%;
			height: 100%;
		}
	}
}
.flex-between {
	@extend .flex;
	align-items: center;
	justify-content: space-between;
}

/* cursor 鼠标形状
------------------------------- */
// 默认
.cursor-default {
	cursor: default !important;
}
// 帮助
.cursor-help {
	cursor: help !important;
}
// 手指
.cursor-pointer {
	cursor: pointer !important;
}
// 移动
.cursor-move {
	cursor: move !important;
}

/* 宽高 100%
------------------------------- */
.w100 {
	width: 100% !important;
}
.h100 {
	height: 100% !important;
}
.vh100 {
	height: 100vh !important;
}
.max100vh {
	max-height: 100vh !important;
}
.min100vh {
	min-height: 100vh !important;
}

/* 颜色值
------------------------------- */
.color-primary {
	color: var(--el-color-primary);
}
.color-success {
	color: var(--el-color-success);
}
.color-warning {
	color: var(--el-color-warning);
}
.color-danger {
	color: var(--el-color-danger);
}
.color-info {
	color: var(--el-color-info);
}

/* 字体大小全局样式
------------------------------- */
@for $i from 10 through 32 {
	.font#{$i} {
		font-size: #{$i}px !important;
	}
}

/* 外边距、内边距全局样式
------------------------------- */
@for $i from 1 through 35 {
	.mt#{$i} {
		margin-top: #{$i}px !important;
	}
	.mr#{$i} {
		margin-right: #{$i}px !important;
	}
	.mb#{$i} {
		margin-bottom: #{$i}px !important;
	}
	.ml#{$i} {
		margin-left: #{$i}px !important;
	}
	.pt#{$i} {
		padding-top: #{$i}px !important;
	}
	.pr#{$i} {
		padding-right: #{$i}px !important;
	}
	.pb#{$i} {
		padding-bottom: #{$i}px !important;
	}
	.pl#{$i} {
		padding-left: #{$i}px !important;
	}
}
/* ------------按钮点击重置------------- */
.el-button{
	&:focus {
		background-color: var(--el-button-bg-color);
		border-color: var(--el-button-border-color);
		color: var(--el-button-text-color);
	}
	&.el-button--primary:focus {
		background-color: var(--el-color-primary);
		border-color: var(--el-color-primary);
		color: var(--el-color-white);
	}
}
